10. Slope of Regression with Outliers
Slope of Regression with Outliers
Question:
Sebastian described to us an algorithm for improving a regression, which you will implement in this project. You will work through it in the next few quizzes. To summarize, what you'll do is
fit the regression on all training points
discard the 10% of points that have the largest errors between the actual y values, and the regression-predicted y values
refit on the remaining points.
Start by running the starter code ( outliers/outlier_removal_regression.py ) and visualizing the points. A few outliers should clearly pop out. Deploy a linear regression, where net worth is the target and the feature being used to predict it is a person’s age (remember to train on the training data!).
The “correct” slope for the main body of data points is 6.25 (we know this because we used this value to generate the data); what slope does your regression have?
Start Quiz:
